package com.b2j.variables;

import com.b2j.base.Lexema;
import com.b2j.base.MainTools;
import com.b2j.base.Routine;

public class Mouse extends Routine {

	@Override
	public String generate(Lexema lexema) {
		
		String line = "JDiv.input.";
		
		// Discard the "."
		lexema = MainTools.tools.nextLexema();
		
		lexema = MainTools.tools.nextLexema();
		String item = lexema.lexema.toLowerCase();
		
		if (item.equals("x"))
			line = line + "getTouchX()";
		else if (item.equals("y"))
			line = line + "getTouchY()";
		else if (item.equals("left"))
			line = line + "isMousePressedLeft()";
		else if (item.equals("right"))
			line = line + "isMousePressedRight()";
			
		return line;
	}


	
}
